
package org.mushroomdb.lock.locktypes;

/**
 * @author Tomas
 *
 * 
 */
public abstract class Lock {
    private long id;
    private boolean exclusive;
    private String userId;
    
    
    public Lock(long id, boolean exclusive, String userId){
        this.id = id;
        this.exclusive = exclusive;
        this.userId = userId;
    }
    
   
    
    /**
     * @return Returns the exclusive.
     */
    public boolean isExclusive() {
        return this.exclusive;
    }
    /**
     * @param exclusive The exclusive to set.
     */
    public void setExclusive(boolean exclusive) {
        this.exclusive = exclusive;
    }
    /**
     * @return Returns the id.
     */
    public long getId() {
        return this.id;
    }
    /**
     * @param id The id to set.
     */
    public void setId(long id) {
        this.id = id;
    }
    /**
     * @return Returns the userId.
     */
    public String getUserId() {
        return this.userId;
    }
    /**
     * @param userId The userId to set.
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }
    
    public abstract boolean  isPage();
    public abstract boolean  isTable();
    public abstract boolean  isRegister();
    
    
    
  
    
    
    
    
}
